'use strict';
/*
 * 系统设置-数据字典管理
 * @type {*}
 */

let underscore = require('underscore');
let RestifyProxy = require('../../util/RestifyProxy');
let StringUtil = require('../../util/StringUtil');
let Constant = require('../../model/Constant');
let baseService = require('../BaseService');
const URI = {
    PARA: '/system/sysdictionary/list',//-数据字典管理——列表
    GROUPLIST: '/system/sysdictionary/group/list',
    ADD: '/system/sysdictionary/insert',
    MODIFY: '/system/sysdictionary/update',
    DELETE: 'system/sysdictionary/delete',
    ENABLED_USER: '/users/{0}/enable',
    DISABLED_USER: '/users/{0}/disable'
};

/**
 * 系统设置--数据字典管理——列表
 * @param thiz
 * @returns {Promise}
 */
module.exports.dictionaryList = function (thiz, params) {
    return baseService.get(thiz, URI.PARA, params);
};

/*-数据字典管理——字典分组数据*/
module.exports.dictionarygroupList = function (thiz, params) {
    return baseService.get(thiz, URI.GROUPLIST, params);
};
/*-数据字典管理——新增页面-保存按钮*/
module.exports.dictionaryAdd = function (thiz, params) {
    // return baseService.put(thiz, StringUtil.format(URI.ADD, params));
    return baseService.post(thiz, URI.ADD, params);
};
/*-数据字典管理——修改页面-保存按钮*/
module.exports.dictionaryModify = function (thiz, params) {
    return baseService.put(thiz,URI.MODIFY, params);
};
/*-数据字典管理——删除按钮*/
module.exports.dictionaryDelete = function (thiz, params) {
    return baseService.post(thiz, URI.DELETE, params);
};





